package config

import (
	"database/sql"
	"github.com/go-redis/redis/v8"
)

var DB *sql.DB
var RDB *redis.Client

var App = &ApplicationConfig{}
var Http = &HttpConfig{}
var Ssh = &SshConfig{}
var Jwt = &JwtConfig{}
var Aes = &AESConfig{}
var Mysql = &MysqlConfig{}
var Redis = &RedisConfig{}

type ApplicationConfig struct {
	Host string
	Name string
	Port int
}

type HttpConfig struct {
	Token        string
	TokenPrefix  string
	SshKeyHeader string
}

type SshConfig struct {
	Port int
}

type JwtConfig struct {
	Secret string
}

type AESConfig struct {
	Secret string
}

type MysqlConfig struct {
	Host   string
	Port   int
	User   string
	Pwd    string
	DBname string
}

type RedisConfig struct {
	Host     string
	Port     int
	DB       int
	Password string
}
